<!--%import("filter/setup_addon.xml")-->
<!--%import("css/addon.css")-->
<!--%import("js/addon.js")-->

<div id="popHeader" class="wide">
    <h3 class="xeAdmin">{$lang->cmd_setup}</h3>
</div>

<form action="./" method="get" onsubmit="return procFilter(this, setup_addon);">
<input type="hidden" name="addon_name" value="{$addon_info->addon_name}" />

    <div id="popBody">
        <table cellspacing="0" class="rowTable">
        <tr>
            <th scope="row"><div><label for="textfield1">{$lang->title}</label></div></th>
            <td>{$addon_info->title} ver. {$addon_info->version} ({zdate($addon_info->date, 'Y-m-d')})</td>
        </tr>
        <tr>
            <th scope="row"><div>{$lang->author}</div></th>
            <td>
            <!--@foreach($addon_info->author as $author)-->
            {$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a>, <a href="mailto:{$author->email_address}">{$author->email_address}</a>)<br />
            <!--@endforeach-->
            </td>
        </tr>
        <tr>
            <th scope="row"><div><label for="textfield2">{$lang->homepage}</label></div></th>
            <td class="blue"><a href="{$addon_info->homepage}" onclick="window.open(this.href);return false;">{$addon_info->homepage}</a>&nbsp;</td>
        </tr>

        <!--@foreach($addon_info->extra_vars as $id => $var)-->

        <!--@if($var->group && ((!$group) || $group != $var->group))-->
        {@$group = $var->group}
        </table>

        <h4 class="xeAdmin">{$group}</h4>
        <table cellspacing="0" class="rowTable">
        <col width="100" />
        <col width="*" />
        <!--@end-->

        <tr class="row{$cycle_idx}">
            <th scope="row"><div>{$var->title}</div></th>
            <td>
                <!--@if($var->type == 'text')-->
                <input type="text" name="{$var->name}" value="{$var->value}" class="inputTypeText w400" />

                <!--@elseif($var->type == 'textarea')-->
                <textarea name="{$var->name}" class="inputTypeTextArea">{$var->value}</textarea>

                <!--@elseif($var->type == 'select')-->
                <select name="{$var->name}">
                    <!--@foreach($var->options as $val)-->
                    <option value="{$val->value}"<!--@if($var->value == $val->value)--> selected="selected"<!--@end-->>{$val->title}</option>
                    <!--@end-->
                </select>
                <!--@end-->
                <p class="clear">{nl2br($var->description)}</p>
            </td>
        </tr>
        <!--@end-->

        <!--@if($group)-->
        </table>
        <table cellspacing="0" class="rowTable">
        <!--@end-->

        <tr>
            <th scope="row"><div>
                {$lang->module}
                <input type="checkbox" onclick="XE.checkboxToggleAll('mid_list'); return false;" />
            </div></th>
            <td>
                <p>{$lang->about_addon_mid}</p>
                <!--@foreach($mid_list as $module_category_srl => $modules)-->
                    <div class="module_category_title">
                        <input type="checkbox" onclick="XE.checkboxToggleAll('mid_list', { wrap:'section_{$module_category_srl}' });" />
                    <!--@if($modules->title)-->
                        {$modules->title}
                    <!--@else-->
                        {$lang->none_category}
                    <!--@end-->
                    </div>

                    <div id="section_{$module_category_srl}">
                    <!--@foreach($modules->list as $key => $val)-->
                        <div class="module_list">
                            <input type="checkbox" value="{$key}" name="mid_list" id="chk_mid_list_{$key}" <!--@if(in_array($key, $addon_info->mid_list))-->checked="checked"<!--@end--> />
                            <label for="chk_mid_list_{$key}">{$key} ({$val->browser_title})</label>
                        </div>
                    <!--@end-->
                    </div>
                <!--@end-->
            </td>
        </tr>
        </table>
    </div>

    <div id="popFooter">
        <span class="button black strong"><input type="submit" value="{$lang->cmd_apply}" /></span>
    </div>
</form>
